<?php


namespace App\Repository1;


use mysql_xdevapi\Exception;

class SuspendedAccountValidator implements OrderValidatorInterface
{

    /**
     * SuspendedAccountValidator constructor.
     */
    public function __construct(Order $order)
    {
        $this->order = $order;
    }

    public function validate(Order $order)
    {
        // TODO: Implement validate() method.
        if ($order->account->isSuspended()) {
            throw new Exception("error");
        }
    }
}